package com.example.assisteddriving.util;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

import androidx.annotation.Nullable;

public class DrivelogSQLiteOpenHelper extends SQLiteOpenHelper {
    public DrivelogSQLiteOpenHelper(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
    }
    

    @Override
    public void onCreate(SQLiteDatabase db) {
        String sql="CREATE TABLE drivelog(id  integer primary key autoincrement,log text , tired text , sleep text, time integer);";
        String sql1="CREATE TABLE xinlv(id  integer primary key autoincrement,xinlv text ,tiwen text,xueyang text, time text);";
        db.execSQL(sql);
        db.execSQL(sql1);
    }
    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
